import React, { Component } from 'react'

// context技术,接收数据的另一种写法
import context from '../context'
export default class Son1 extends Component {
  // 给当前组件添加静态属性 contextType
  static contextType = context
  render() {
    // this.context就可以接收到传递过来的数据了
    return <div>Son1, {this.context}</div>
  }
}
